Repository navigation
fix(storage): pass universe_domain in generate_signed_post_policy_v4 - #19243
Merged
Merged
Conversation
`Client.generate_signed_post_policy_v4` now passes `self.universe_domain` to `_sign_message`, aligning its configuration handling with `Blob.generate_signed_url`. Existing signing behavior for clients using the default universe domain and local credential signing remains unchanged. Added unit test coverage in `packages/google-cloud-storage/tests/unit/test_client.py`. [Generated-by: AI]
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the generate_signed_post_policy_v4 method in client.py to pass the universe_domain parameter to _sign_message when signing a post policy with an access token and service account email. It also adds a corresponding unit test to verify this behavior. There are no review comments, so I have no feedback to provide.
Contributor
Author
|
/gcbrun |
nidhiii-27
marked this pull request as ready for review
November 27, 2026 08:59
nidhiii-27
requested review from
chandra-siri
and removed request for
a team
November 27, 2026 08:59
shradhakatyal
approved these changes
Nov 30, 2026
shradhakatyal
left a comment
Contributor
There was a problem hiding this comment.
LGTM. self.universe_domain always returns a non-empty value, and the default-universe behaviour is unchanged.
Test_sign_message.test_sign_bytes_w_universe_domain verifies that _sign_message sends the request to the iamcredentials endpoint for the provided universe_domain and returns the expected signature. Existing _sign_message behavior with the default universe domain remains unchanged. Added unit test coverage in packages/google-cloud-storage/tests/unit/test__signing.py. [Generated-by: AI]
Contributor
Author
|
Re: feedback from @shradhakatyal Thank you for the review! Added Co-authored by AI Agent |
Contributor
Author
|
/gcbrun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Client.generate_signed_post_policy_v4now passesself.universe_domainto_sign_message, aligning its configuration handling withBlob.generate_signed_url. Existing signing behavior for clients using the default universe domain and local credential signing remains unchanged. Added unit test coverage inpackages/google-cloud-storage/tests/unit/test_client.pyandpackages/google-cloud-storage/tests/unit/test__signing.py.